﻿
Partial Class WebForm_Main_SearchEnlistHeader
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            RaiseEvent Loaded(Me, New EventArgs)
        End If
    End Sub

    Protected Sub gvEnlistHeaderInfo_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvEnlistHeaderInfo.PageIndexChanging
        Me.gvEnlistHeaderInfo.PageIndex = e.NewPageIndex
        Me.BindGV()
    End Sub
End Class

Partial Class WebForm_Main_SearchEnlistHeader
    Public Sub BindGV()
        Dim sql As New MyStringBuilder
        Dim dat As New clsData

        sql.AppendFormat("Select a.*,b.OrganizationName from EnlistHeader a inner Join organizationview b on a.UOrganizationID=b.UOrganizationID where Getdate() between a.ApplyStartDate and a.ApplyEndDate ")

        Me.gvEnlistHeaderInfo.DataSource = dat.GetData(sql)
        Me.gvEnlistHeaderInfo.DataBind()
    End Sub

    Public Event Loaded(ByVal source As Object, ByVal e As EventArgs)
End Class